<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /**
 * 1. 开发一款软件，根据公式（身高-108）*2=体重，可以有10斤左右的浮动。来观察测试者
 */
        function isHeightWeight(name, height, weight) {
            // var height = 172 
            // var weight = 120

            if (weight > (height - 108) * 2 + 10) {
                console.log(name + '体重过重');
            } else if (weight < (height - 108) * 2 - 10) {
                console.log(name + '体重过轻');
            } else {
                console.log(name + '标准体重');
            }
        }

        isHeightWeight('中骏', 172, 120)  // 函数调用语句
        isHeightWeight('心意', 162, 90)  // 函数调用语句
    </script>
</body>

</html>